$(function(){
	$(document).on("click",".js-upload-btn",function(){
			var p=$(this).parents(".js-upload-item");
			p.find(".js-upload-file").click();
		});
		
		$(document).on("change",".js-upload-file",function(){
			var p=$(this).parents(".js-upload-item");
			var id=$(this).attr("id");
			skyUpload(id,"/index.php?m=upload&a=uploadTao",function(e){
				var data=eval("("+e.target.responseText+")");
				if(data.error==0){
					var html='<img src="'+data.trueimgurl+'.100x100.jpg">';
					p.find(".js-imgbox").html(html);
					p.find(".js-imgurl").val(data.imgurl);
				}
			})
		})
})
